"""learning_platform URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from .views import *

urlpatterns = [
    path('admin/', admin.site.urls),
    path('img_code/<uuid:uuid>',Image.as_view()),# 验证码
    path('login',Login.as_view()),# 登录
    path('headmaster',Headmaster.as_view()),# 校长
    path('headmaster/<int:pk>',HeadmasterAPI.as_view()),

    path('school',School.as_view()),# 学校
    path('school/<int:pk>',Single_School.as_view()),

    path('menu',MenuBarViews.as_view()),# 菜单

    path('teacher',Teacher.as_view()), # 老师
    path('teacher_school',Teacher_School.as_view()),# 该学校下的老师
    path('teacher/<int:pk>',TeacherAPi.as_view()),

    path('class',Cls.as_view()),# 班级
    path('cals',cals.as_view()),# 该老师下的班级
    path('students',Students.as_view()),# 新增学生
    path('cla_student/<int:pk>',Cla_Student.as_view()),# 获取该班级下所有的学生

    path('greeting',GreetingsView.as_view()),# 问候语

    path('sort',SortAPI.as_view()), # 分类
    path('label',LabelAPI.as_view()),# 标签

    path('collect',CollectView.as_view()),# 收藏

    path('learning_content',Learning_contentAPI.as_view()),# 学习内容
    path('content/<int:pk>',ContentAPI.as_view()),
    path('learning',Learning_Content.as_view()),# 获取我发布的学习内容

    path('resource',Resources.as_view()),# 资源
    path('resource/<int:pk>',ResourceAPI.as_view()),

    path('chapters/<int:pk>',Chapters.as_view()),# 章节

    path('sections',Sections.as_view()),# 小节
    path('sections/<int:pk>',SectionsAPI.as_view()),

    path('learn_task',LearnTask.as_view()),#学习任务
    path('task/<int:pk>',Task.as_view()),# 获取班级下的任务


    path('comment',CommentsView.as_view()),# 评论
    path('comment/<int:id>',CommentViewsTow.as_view()),# 查看评论

    path('tasnf',TasnfView.as_view()),# 点赞

    path('voluntarily',Voluntarily.as_view()),#自动生成标签
]
